{% extends "dtdBase.html" %}

{% block title %}议价区{% endblock %}

{% load updateleftmenucss %}

{% block leftmenu %}{% left_css "infocernter" %} {% endblock %}

{% block javascript %}
    <script type="text/javascript" src="/static/js/plugins/jquery.flot.min.js"></script>
    <script type="text/javascript" src="/static/js/custom/widgets.js"></script>
    <script type="text/javascript" src="/static/js/plugins/modernizr.custom.min.js"></script>
    <link rel="stylesheet" type="text/css" href="/static/css/modernizr.custom.min.css" />
    <script type="text/javascript">

        function DropDown(el) {
            this.dd = el;
            this.placeholder = this.dd.children('span');
            this.opts = this.dd.find('ul.dropdown > li');
            this.val = '';
            this.index = -1;
            this.initEvents();
        }
        DropDown.prototype = {
            initEvents : function() {
                var obj = this;
                obj.dd.on('click', function(event){
                    jQuery(this).toggleClass('active');
                    return false;
                });

                obj.opts.on('click',function(){
                    var opt = jQuery(this);
                    obj.val = opt.text();
                    obj.index = opt.index();
                    obj.placeholder.text(obj.val);
                });
            },
            getValue : function() {
                return this.val;
            },
            getIndex : function() {
                return this.index;
            }
        }

        jQuery(function() {
            var dd = new DropDown(jQuery('#dd') );
            jQuery(document).click(function() {
                // all dropdowns
                jQuery('.wrapper-dropdown-3').removeClass('active');
            });

        });

    </script>
{% endblock %}

{% block maincontentinner %}

    <ul class="maintabmenu">

        <li class="current"><a href="{% url 'viewtaskflow' %}">任务流</a></li>
        <li ><a href="{% url 'load_infocenter' %}">议价区</a></li>
        <li><a href="{% url 'my_task' %}">我的任务</a></li>
        <li><a href="{% url 'load_create_task' %}">发布任务</a></li>
    </ul><!--maintabmenu-->

    <div class="content widgetgrid">
        <div class="widgetbox" style="width:100%">

        <div class="title2"><h2 ><span>
                        <div id="dd" class="wrapper-dropdown-3" tabindex="1">
                            <span>&nbsp;</span>

                            <ul class="dropdown">
                                <li style="text-align: right"><a href="#"><i></i>翻译</a></li>
                                <li style="text-align: right"><a href="#"><i></i>培训</a></li>
                            </ul>
                        </div>

                </span>
        </h2></div>
            <div class="widgetcontent userlistwidget">
                <ul>


                       {% for  task in tasks %}
                    <li>


                      <!--<div class="avatar"><img src="/static/images/{{ task.User_id.User_pic }}" class="photo"/></div>-->
                        <div class="info" >
                            {% if task.Task_type == '1' %}
                                培训
                            {% elif  task.Task_type == '2'  %}
                                翻译
                            {% endif %}  &nbsp;&nbsp; <a href=".">{{task.Task_user_name }}</a> {{ task.Task_name }}&nbsp;&nbsp;
                        </div>
                        <div>



                            <b>{{ task.Prices }}</b> 人民币&nbsp;&nbsp;发布时间：{{ task.Create_time|date:"Y年m月d日"}}</div>

                    </li>
                    {% endfor %}
                </ul>
                <br clear="all" />
                <a href="" class="more">更多</a>
            </div><!--widgetcontent-->
        </div><!--widgetbox-->

    </div><!--content-->

{% endblock %}
